package com.situ.water_pay.vo;

import com.situ.util.DataHandleUtil;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 月资金回收情况报表实体类
 * @date 2020/12/17 - 18:49
 */
@Data
public class FundRecovery {
    private String year;//年月
    private String totalTons;//总吨数
    private double totalDue;//总应收
    private double totalReceived;//总实收
    private double totalMoneyOwed;//欠款总额
    private String recoveryRate;//回收率

    public double getTotalMoneyOwed() {
        BigDecimal b1 = new BigDecimal(Double.toString(totalDue));
        BigDecimal b2 = new BigDecimal(Double.toString(totalReceived));
        return b1.subtract(b2).doubleValue();
    }

    public String getRecoveryRate() {
        return DataHandleUtil.division(totalReceived,totalDue);
    }

    private String userNo;//用户编号
    private String userName;//用户姓名
    private double userTotalBillMoney;//用户预收总金额
    private String userAddress;//用户地址
    private String userPhone;//用户电话

}
